(function () {
    "use strict";

    angular
        .module("common.services")
        .factory("submissionResource",
        [
            "$resource",
            "appSettings",
            "currentUser",
            submissionResource
        ]);

    function submissionResource($resource, appSettings, currentUser) {
        return $resource(appSettings.serverPath + "/api/submissions/taskId/:id", null, {
            'query': {
                headers: { 'Authorization': "Bearer " + currentUser.getProfile().token },
                isArray: true
            }
        });
    }
}());

